package com.shensi.api.admin.client.label;

import com.shensi.api.admin.client.fallback.label.CustomerLabelClientFallBack;
import com.shensi.api.admin.domian.label.dto.CustomerLabelDemoDto;
import com.shensi.api.admin.domian.label.dto.CustomerLabelDto;
import com.shensi.api.admin.domian.label.dto.RequstCustomerLabelDto;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.page.TableDataInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = CustomerLabelClientFallBack.class)
@Component
public interface CustomerLabelClient {

    /**
     * 查询用户标签列表
     */
    @GetMapping("/label/label/list")
    @ApiOperation("查询标签列表")
    public TableDataInfo list(@SpringQueryMap CustomerLabelDto customerLabel);

    /**
     * 导出用户标签列表
     */
    @GetMapping("/label/label/export")
    public AjaxResult export(@SpringQueryMap CustomerLabelDto customerLabel);

    /**
     * 获取用户标签详细信息
     */
    @GetMapping(value = "/label/label/{id}")
    public AjaxResult getInfo(@PathVariable("id") Integer id);

    /**
     * 获取用户标签详细信息
     */
    @GetMapping(value = "/label/label/selectCustomerLabelInfo")
    public AjaxResult selectCustomerLabelInfo(@SpringQueryMap CustomerLabelDto customerLabel);

    /**
     * 查询没有绑定标签的客户
     * @param customerLabel
     * @return
     */
    @GetMapping(value = "/label/label/selectNotCustomerLabelInfo")
    public TableDataInfo selectNotCustomerLabelInfo(@SpringQueryMap CustomerLabelDto customerLabel);

    /**
     * 查询以绑定标签的客户信息
     * @param customerLabel
     * @return
     */
    @GetMapping(value = "/label/label/selectPhoneList")
    public TableDataInfo selectPhoneList(@SpringQueryMap CustomerLabelDto customerLabel);

    /**
     * 查询绑定标签的客户导出
     * @param customerLabel
     * @return
     */
    @GetMapping(value = "/label/label/selectPhoneListExport")
    public AjaxResult selectPhoneListExport(@SpringQueryMap CustomerLabelDto customerLabel);


    /**
     * 查询标签是否绑定了人
     * @param customerLabel
     * @return
     */
    @GetMapping(value = "/label/label/selectLabel")
    public AjaxResult selectLabel(@SpringQueryMap CustomerLabelDto customerLabel);

    /**
     * 新增用户标签
     */
    @PostMapping("/label/label")
    public AjaxResult add(@RequestBody CustomerLabelDto customerLabel);

    /**
     * 修改用户标签
     */
    @PutMapping("/label/label")
    public AjaxResult edit(@RequestBody CustomerLabelDto customerLabel);

    /**
     * 打用户标签
     */
    @PostMapping("/label/label/addAndDelCustomerLabel")
    public AjaxResult addAndDelCustomerLabel(@RequestBody RequstCustomerLabelDto requstCustomerLabel);



    /**
     * 删除用户标签
     */
    @DeleteMapping("/label/label/{ids}")
    public AjaxResult remove(@PathVariable("ids") Integer[] ids);

    /**
     * 查询标签用户
     */
    @GetMapping(value = "/label/label/selectCustomerLabelInfoList")
    public TableDataInfo selectCustomerLabelInfoList(@SpringQueryMap CustomerLabelDemoDto customerLabelDemo);


    /**
     * 导出用户标签列表
     */
    @GetMapping("/label/label/selectCustomerLabelInfoListExport")
    public AjaxResult selectCustomerLabelInfoListExport(@SpringQueryMap CustomerLabelDemoDto customerLabelDemo);


    /**
     * 修改用户标签
     */
    @PostMapping("/label/label/delCustomerLabel")
    public AjaxResult delCustomerLabel(@RequestBody CustomerLabelDemoDto customerLabelDemo);

}
